package com.wanho.java159.cb.repositories;

import com.wanho.java159.cb.po.CarInfo;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

import java.util.List;

public interface CarInfoRepository extends ElasticsearchRepository<CarInfo,Long> {
    /**
     * 根据车主查询
     * @param carMaster
     * @return
     */
    List<CarInfo> findCarInfosByCarMaster(String carMaster) ;

    /**
     * 根据车主 或 车牌 查询  分页查询
     * @param carMaster
     * @param carNo
     * @param pageable
     * @return
     */
    List<CarInfo> findCarInfosByCarMasterOrCarNo(String carMaster, String carNo, Pageable pageable) ;
}
